Recently, user terminals such as electronic devices (e.g., a mobile device, a mobile phone, a smart phone, and a tablet Personal Computer (PC)) have one or more cameras and provide a function of photographing an image such as a still picture or a moving picture by using the one or more cameras.
The function of photographing the image provides a function of automatically detecting a focus of the image. As a method of automatically detecting a focus of an image, a contrast detection method is widely used.
The above information is presented as background information only to assist with an understanding of the present disclosure. No determination has been made, and no assertion is made, as to whether any of the above might be applicable as prior art with regard to the present disclosure.